package campingcar.bo;

import java.util.Calendar;

import algutil.date.ConversionDate;

public abstract class Commentaire {

	protected int id;
	protected int emplacementId;

	protected Calendar date;
	protected String texte;
	protected String user;

	// private static final Logger log = Logger.getLogger(Commentaire.class);

	public Calendar getDate() {
		return date;
	}

	public void setDate(Calendar date) {
		this.date = date;
	}

	public String getTexte() {
		return texte;
	}

	public void setTexte(String texte) {
		this.texte = texte;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String toString() {
		return ConversionDate.getStringDate(date)
				+ " "
				+ user
				+ " : "
				+ texte.substring(0, (texte.length() > 40) ? 40 : texte
						.length()) + "...";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getEmplacementId() {
		return emplacementId;
	}

	public void setEmplacementId(int emplacementId) {
		this.emplacementId = emplacementId;
	}
}
